package cm.tl.pms.enums.base;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 区级财政
 * 市级转移支付
 * 专项资金
 * 自有资金
 * 其他
 */
@Getter
@AllArgsConstructor(access= AccessLevel.PRIVATE)
public enum FundTypeEnum implements IEnum {
    DISTRICT_FUND("区级财政", 1),
    CITY_TRANSFER_PAYMENT("市级转移支付", 2),
    SPECIAL_FUND("专项资金", 3),
    OWN_FUND("自有资金", 4),
    OTHER_FUND("其他", 5);
    private final String name;
    private final Integer value;

    public static FundTypeEnum nameOf(Integer value) {
        for (FundTypeEnum e : FundTypeEnum.values()) {
            if (e.value.equals(value)) {
                return e;
            }
        }
        return null;
    }
}
